An open-loop unstable plant. The transfer function is derived, the right-half-plane pole responsible for instability is identified, and a feedback controller is constructed that relocates the closed-loop poles into the stable region.
The inverted pendulum consists of a uniform rigid rod of length $L$ and point mass $m$ mounted at its base on a frictionless pivot, with the mass positioned above the pivot rather than below. The angle $\theta$ is measured from the upright vertical.
An external torque $\tau(t)$, supplied by a motor at the pivot, constitutes the input. The angle $\theta(t)$ is the output. A viscous damping coefficient $b$ acts on the angular velocity. The configuration differs from the conventional gravity pendulum only in the orientation of the mass, but this change reverses the sign of the gravitational term, with consequences developed below.
The objective is to express this difference as a property of the transfer function, and to introduce a controller that restores stability without modifying the plant.
Newton's second law for rotation about the pivot is $I\ddot{\theta} = \sum \tau$, with $I = mL^2$ the moment of inertia of a point mass at radius $L$. Three torques act about the pivot.
Three contributions act about the pivot:
For small $\theta$ the Taylor expansion $\sin\theta = \theta - \theta^3/6 + \ldots$ is truncated at first order, accurate to within $2\%$ for $\theta \le 20^\circ$:
The sign of the gravitational term is the single point of difference between this equation and that of the standard gravity pendulum. The standard pendulum carries $+mgL\theta$ on the left-hand side (a restoring stiffness); the inverted pendulum carries $-mgL\theta$ (a destabilising stiffness).
Dividing through by $mL^2$ and writing $\omega_0^2 = g/L$ for the natural angular frequency of the equivalent gravity pendulum:
Under quiescent initial conditions $\theta(0) = \dot{\theta}(0) = 0$, each derivative maps to a multiplication by $s$:
Factoring $\Theta(s)$ and forming the ratio $\Theta(s)/T(s)$ yields the open-loop transfer function, stated in the next section.
From the linearised Laplace-domain equation, the open-loop transfer function $G(s)$ from applied torque to angle is
The poles of $G(s)$ are the roots of its denominator. Setting the denominator to zero:
The discriminant is strictly positive whenever $\omega_0 \ne 0$, so both poles are real. The second term under the square root exceeds the first in magnitude, so one pole lies on the positive real axis:
A pole in the right half-plane corresponds to a time-domain mode of the form $e^{s_1 t}$, which grows without bound. Any nonzero initial condition, including disturbance from sensor noise or air currents, projects onto this mode and produces unbounded growth. The system is therefore unstable in the bounded-input bounded-output sense.
For $L = 0.5~\mathrm{m}$, $m = 1~\mathrm{kg}$, $b = 0.05~\mathrm{N{\cdot}m{\cdot}s/rad}$, and $g = 9.81~\mathrm{m/s^2}$ one finds $\omega_0 = \sqrt{g/L} \approx 4.43~\mathrm{rad/s}$. The poles are approximately $s_1 \approx +4.41$ and $s_2 \approx -4.51$. The unstable mode grows by a factor of $e \approx 2.72$ every $1/s_1 \approx 0.23~\mathrm{s}$.
The right-half-plane pole has a direct physical interpretation. With no applied torque, an initial perturbation $\theta(0) = \theta_0$ from the upright equilibrium evolves according to the homogeneous solution
with constants $A$, $B$ fixed by the initial conditions. The decaying mode $e^{s_2 t}$ contributes a transient. The growing mode $e^{s_1 t}$ dominates within a fraction of a second, and the linearisation ceases to apply once $\theta$ leaves the small-angle regime. In the figure the linearised model is integrated until the angle reaches $\pm 90^\circ$, at which point the trajectory is held to indicate departure.
The time to depart from upright is approximately $(1/s_1)\,\ln(\theta_{\max}/\theta_0)$, growing only logarithmically as the perturbation is reduced. Halving $\theta_0$ delays departure by approximately $0.16~\mathrm{s}$; reducing it a thousand-fold delays it by only $1.6~\mathrm{s}$. No finite initial precision stabilises the system in open loop.
A controller is a system that observes the output of the plant and computes an input intended to drive that output toward a desired reference. The arrangement of plant, sensor, controller, and summing junction constitutes a closed loop, as distinct from the open loop of the preceding sections.
The block diagram below states this structure. The reference $R(s)$ is the desired angle, set to zero for the upright stabilisation problem. The error $E(s) = R(s) - \Theta(s)$ is the difference between the reference and the measurement. The controller $C(s)$ acts on the error to produce a torque command $T(s) = C(s)\,E(s)$, which drives the plant $G(s)$.
The poles of the plant are properties of the physical assembly. They cannot be moved by any choice of input signal, since the input enters only the right-hand side of the differential equation. Feedback modifies the equation itself. Substituting $\tau = -K_p\theta - K_d\dot{\theta}$ converts the original
into
whose effective stiffness and damping are set by the controller gains. The next section derives the closed-loop transfer function from this substitution.
The closed-loop transfer function $T_{cl}(s) = \Theta(s)/R(s)$ is obtained by writing the algebraic relations imposed by each block and eliminating the intermediate signals.
Reading the block diagram from left to right:
Substituting the controller relation into the plant relation:
Collecting the $\Theta(s)$ terms on the left:
Dividing yields the closed-loop transfer function:
This is the standard result of feedback theory. Its denominator $1 + G(s)C(s)$ is the characteristic polynomial; the roots of this polynomial are the closed-loop poles, which determine the stability of the controlled system.
The closed-loop poles are not the open-loop poles. They are the roots of $1 + G(s)C(s) = 0$, a polynomial whose coefficients depend on both the plant and the controller. With a suitable choice of $C(s)$, the closed-loop poles can be relocated to any positions consistent with the order of the polynomial. In particular, poles initially in the right half-plane can be moved into the left half-plane.
A proportional-derivative (PD) controller is taken, of the form $C(s) = K_p + K_d s$. This controller acts on both the angle $\theta$ and its rate of change $\dot{\theta}$. Multiplying $G(s)$ by $C(s)$:
Substituting into $T_{cl}(s) = GC/(1 + GC)$ and clearing denominators:
The denominator coefficients are functions of both plant parameters and controller gains. The conditions for both closed-loop poles to lie in the left half-plane follow from the Routh–Hurwitz criterion for a quadratic, which requires that all coefficients share the same sign:
The first condition requires the proportional gain to exceed the destabilising gravitational stiffness. The second is satisfied by any non-negative $K_d$. When both inequalities hold, the inverted pendulum is stabilised.
The closed-loop denominator $mL^2 s^2 + (b + K_d) s + (K_p - mgL)$ is a quadratic whose roots admit a closed-form expression. Their position in the complex plane is fully determined by the two controller gains $K_p$ and $K_d$. The plot shows the closed-loop poles for the present gain selection alongside the open-loop poles for reference.
Three regimes are observed as $K_p$ is varied from below to above the critical value $mgL$:
With the PD controller active, the pendulum is integrated subject to the same initial perturbation as in Section 04, with the actuator driven by $\tau(t) = -K_p\,\theta(t) - K_d\,\dot{\theta}(t)$. The two pendulums shown share identical physical parameters and identical initial conditions; they differ only in whether the feedback loop is engaged.
The trace at the bottom of each panel shows the time evolution of $\theta$. The open-loop response diverges along $e^{s_1 t}$ as before. The closed-loop response, governed by the stable characteristic polynomial, decays toward zero with a time constant set by the real part of the closed-loop pole pair.
The same principle generalises to plants of arbitrary order and to controllers of higher complexity than PD. For any $C(s)$, the closed-loop characteristic polynomial $1 + G(s)C(s) = 0$ governs stability, and the design objective is to choose $C(s)$ such that all of its roots lie in the left half-plane.